﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.ComponentModel.DataAnnotations;
using MobileSales.Model.Localization;
using MobileSales.Model.Util;

namespace MobileSales.Model.Tasks
{
    [DataContract]
    public class Task : TaskBase
    {
        #region Public members
        [DataMember]
        public int Id { get; set; }
        [DataMember]
        public int CreatorId { get; set; }
        [DataMember]
        public int? ScheduleId { get; set; }
        [DataMember]
        [Display(Name = "TaskType", ResourceType = typeof(ModelStrings))]
        public TaskType TaskType { get; set; }
        [DataMember]
        [Display(Name = "TaskStatus", ResourceType = typeof(ModelStrings))]
        public TaskStatus TaskStatus { get; set; }
        [DataMember]
        [Display(Name = "Client", ResourceType = typeof(ModelStrings))]
        public int? ClientId { get; set; }
        [DataMember]
        [Display(Name = "Info", ResourceType = typeof(ModelStrings))]
        public string Info { get; set; }
        [DataMember]
        [Display(Name = "Priority", ResourceType = typeof(ModelStrings))]
        [Required(ErrorMessageResourceName = "Required", ErrorMessageResourceType = typeof(ValidationStrings))]
        [RegularExpression(RegExp.IntegerRegexp, ErrorMessageResourceName = "InvalidInteger", ErrorMessageResourceType = typeof(ValidationStrings))]
        public int Priority { get; set; }
        #endregion
    }
}
